package Servlet;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import Info.TaocanI;
import Manage.TaocanM;


public class UpdateTS extends HttpServlet{
	protected void service(HttpServletRequest request, HttpServletResponse response) 
			throws ServletException, IOException {
		request.setCharacterEncoding("utf-8");
		response.setContentType("text/html;charset=utf-8");
		
		//int id = Integer.parseInt(request.getParameter("id"));
		String num = request.getParameter("num");
		String type = request.getParameter("type");
		String xiangqiang = request.getParameter("xiangqing");
		String price = request.getParameter("price");
		TaocanI ti = new TaocanI(num,type,xiangqiang,price);
		TaocanM tm = new TaocanM();
		tm.update(ti);
		response.sendRedirect("LookTaocanS");
	}

}
